package com.mf.utils;

/**
 * @Author: lmf
 * @Create: 2024/6/7 11:09
 * Description: 数组工具类
 */
public class VerifyUtils {
    /**
     * 验证 值是为空
     */
    public static boolean isEmpty(Integer number) {
        return number == null || number.toString().isEmpty();
    }

    public static boolean isEmpty(Object obj) {
        if(obj instanceof String || obj instanceof Integer || obj instanceof Long || obj instanceof Short || obj instanceof Byte){
            return isEmpty(obj);
        }
        return obj == null;
    }

    /**
     * 验证 值是为空
     */
    public static boolean isEmpty(String str) {
        return str == null || str.isEmpty();
    }

    /**
     * 验证 值不为空
     */
    public static boolean isNotEmpty(Integer number) {
        return !isEmpty(number);
    }
    /**
     * 验证 值不为空
     */
    public static boolean isNotEmpty(Object obj) {
        if(obj instanceof String ){
            return obj != "";
        }
        return obj != null;
    }
    /**
     * 验证 值不为空
     */
    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }
}
